import { ref } from 'vue'

export const formRules = ref([
    {
        type: 'input',
        props: {
            label: '旧密码',
            prop: 'oldPassword',
            rules: [
                { required: true, message: '请输入旧密码', trigger: 'blur' },
                { min: 1, max: 20, message: '1 到 20个字符', trigger: 'blur' },
            ],
        },
        labelProps: {
            placeholder: '请输入旧的密码',
        },
        col: {
            span: 12,
        },
    },
    {
        type: 'input',
        props: {
            label: '新密码',
            prop: 'password',
            rules: [
                { required: true, message: '请输入新密码', trigger: 'blur' },
                { min: 1, max: 20, message: '1 到 20个字符', trigger: 'blur' },
            ],
        },
        labelProps: {
            placeholder: '请输入新的密码',
        },
        col: {
            span: 12,
        },
    },
    {
        type: 'input',
        props: {
            label: '确认密码',
            prop: 'confirmPassword',
            rules: [
                { required: true, message: '请二次输入确认密码', trigger: 'blur' },
                { min: 1, max: 20, message: '1 到 20个字符', trigger: 'blur' },
            ],
        },
        labelProps: {
            placeholder: '请二次输入确认密码',
        },
        col: {
            span: 12,
        },
    },
])
